﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LINQToolKit.Douban.Entities
{
    public sealed class Mail : EntityBase
    {
        public AssociationRef<People> Author { get; set; }
        public AssociationRef<People> Receiver { get; set; }

        public bool IsUnRead 
        {
            get
            {
                var value = this.GetAttribute("unread");

                if (!string.IsNullOrEmpty(value))
                {
                    return Convert.ToBoolean(value);
                }

                return false;
            }
        }
    }
}
